<template>
	<view class="main">
		
		<view class="list">
			<view class="row row-title">
				<view class="col col-1">识别码</view>
				<view class="col col-2">存货编码</view>
				<view class="col col-3">数量</view>
				<view class="col col-4">批号</view>
			</view>
			<view class="row row-col" v-for="item in dataList">
				<view class="col col-list col-1 col-1-1">01</view>
				<view class="col col-list col-2 col-2-1">002</view>
				<view class="col col-list col-3 col-3-1">234</view>
				<view class="col col-list col-4 col-4-1" >299911</view>
			</view>
		</view>
		<!-- <view class="list-tip">没有更多数据了</view> -->
		
		<!--底部按钮-satrt-->
		<view class="btn">
			<view class="btn-item" @click="submit">打印条码</view>
		</view>
		<!--底部按钮-end-->
		
	</view>
</template>


<script>
	import db from '@/common/localstorage.js'
	export default {
		name: 'pages-index-index',
		data() {
			return {
				examId:'',
				dataList: [{}],
				has_more: true,
				status: 'loadmore',
				queryParam: {
					size: 10,
					current: 1,
					params:{}
				}
			};
		},
		

		 onLoad(options) {
			 // this.queryParam.params.examId = options.id
			// this.getList()
		},

		methods: {	
			
			getList() {
				uni.showLoading({
					title: '请稍后...'
				})
				this.queryParam.userId = db.get('userInfo').id
				this.$postjsonfcbk('/stat/exam/user-paging', this.queryParam).then(res => {
					let detail = res.data.data.records
					this.dataList = [...this.dataList, ...detail]
					this.has_more = this.dataList.length < res.data.total
					uni.hideLoading()
				})
			},
		},
		onReachBottom() {
			if (this.has_more) {
				this.status = 'loading';
				this.queryParam.current++;
				// this.getList();
			}
		},

		onPageScroll(e) {},
		onPullDownRefresh() {},

	};
</script>


<style lang="scss" scoped>
	.btn {
		position: fixed;
		bottom: 0;
		left: 0;
		height: 118rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -2rpx 0rpx 0rpx rgba(0, 0, 0, 0.06);
		padding-bottom: 68rpx;
		padding-left: 30upx;
		padding-right: 30upx;
		padding-top: 30upx;
		width: calc(100% - 60upx);
	
		.btn-item {
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #FFFFFF;
			text-align: center;
			width: 276rpx;
			height: 88rpx;
			line-height: 88upx;
			background: linear-gradient( 138deg, #12C66B 0%, #11AA66 100%);
			border-radius: 44rpx;
			margin-left: auto;
			margin-right: 40upx;
		}
	}
	
	page{
		background: #F9F9F9;
	}
	.main{
		padding:20upx 24upx;
	}
	.list{
		background: #fff;
	}

	.row {
		display: flex;
	}

	.row-title {
		background: #E7F7F0;
		border-radius: 10rpx 10rpx 0rpx 0rpx;
		padding: 18upx 0;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #111111;
	}

	.row-col {
		background: #fff !important;
	
		border-bottom: rgba(235, 236, 241, 1) solid 1upx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #111111;
	}
	.col-list{
		padding: 30upx 0;
	}

	.col {
		text-align: center;
	}

	.col-1 {
		width: 30%;
		// width: 60%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		padding-left:  4upx;
		padding-right:  4upx;
	}

	.col-2 {
		width: 20%;
	}
	
	.col-1-1{border-left:rgba(235, 236, 241,1) solid 1upx;}
	.col-2-1{
		border-right:rgba(235, 236, 241, 1) solid 1upx;
		border-left:rgba(235, 236, 241,1) solid 1upx;
	}

	.col-3 {
		width: 20%;
	}
	.col-3-1{
		border-right:rgba(235, 236, 241, 1) solid 1upx;
	}

	.col-4 {
		width: 30%;
	}
	.col-4-1{border-right:rgba(235, 236, 241, 1) solid 1upx;}
	.list-tip{
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #999999;
		text-align: center;
		padding: 40upx;
		padding-bottom: 120upx;
	}
</style>